Microsoft DirectX 8.1 (C++)

CBaseReferenceClock::GetTime

The GetTime method retrieves the current reference time. This method implements the IReferenceClock::GetTime method.

Syntax

HRESULT GetTime(
    REFERENCE_TIME *pTime
);

Parameters

pTime

Pointer to a variable that receives the current time, in 100-nanosecond units.

Return Value

Returns one of the HRESULT values shown in the following table.

Value Description
E_POINTER NULL pointer argument.
S_FALSE Returned time is the same as the previous value.
S_OK Success.

Remarks

This method calls the CBaseReferenceClock::GetPrivateTime method to determine the real clock time. If the clock time is strictly greater than the previous value, GetTime uses the clock time and returns S_OK. Otherwise, GetTime uses the previous value and returns S_FALSE. Therefore, the internal clock can run backward for a short period, without causing the reference time to run backward. Instead, the reference time will "stall" at the same value until the internal clock catches up.

See Also